﻿@model RechercheEmplois.Models.RegisterViewModel
@{
    ViewBag.Title = "Register";
}

@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <h2>Créer un nouveau utilisateur.</h2>
    <div class="alert-info">Les champs étoilées sont obligatoire...</div>
    <hr />
    @Html.ValidationSummary()
    <div class="form-group">
        @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Nom, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.Nom, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Prenom, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.Prenom, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.BirthDate, new { @class = "col-md-2 control-label" })
        <div class="col-md-5" id="datePicker">
            @Html.TextBoxFor(m => m.BirthDate, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.TelephoneNum, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.TelephoneNum, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
            @Html.LabelFor(model => model.GroupUtilisateurID, "GroupUtilisateurID", new { @class = "control-label col-md-2" })
            <div class="col-md-5">
                @Html.DropDownList("GroupUtilisateurID", (List<SelectListItem>)ViewBag.listTypesUser, new { @class = "selectpicker show-tick", data_live_search = "true" })
                @Html.ValidationMessageFor(model => model.GroupUtilisateurID)
            </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" class="btn btn-default" value="Register" />
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script type="text/javascript">
    $(document).ready(function () {
        $('#datePicker input').datepicker({
        });
        //inicialization of select picker
        $('.selectpicker').selectpicker();
    });
</script>